﻿<%@ Page  Language="C#" MasterPageFile="AdminSite.master" AutoEventWireup="true"
    CodeFile="QuanLyTuyenDuong.aspx.cs" Inherits="QuanLyTuyenDuong" %>

<%@ Register assembly="CKEditor.NET" namespace="CKEditor.NET" tagprefix="CKEditor" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 106px;
        }
        .style2
        {
        }
        .style4
        {
            height: 21px;
        }
        .style5
        {            width: 375px;
        }
        .style6
    {
        width: 63px;
    }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2 align="center" style="font-weight: bold">
        QUẢN LÝ TUYẾN ĐƯỜNG</h2>
         <asp:ValidationSummary ID="TuyenDuongValidationSummary" runat="server" CssClass="failureNotification" 
                 ValidationGroup="TuyenDuongValidationGroup"/>
    <table style="width: 100%">
        <tr>
            <td class="style1">
                <asp:Label ID="Label1" runat="server" Text="Bến đi"></asp:Label>
            </td>
            <td class="style5">
                <asp:TextBox ID="txtBenDi" runat="server" Height="23px" Width="92%"></asp:TextBox>
                <asp:RequiredFieldValidator ID="txtBenDiRequired" runat="server" ControlToValidate="txtBenDi" 
                             CssClass="failureNotification" ErrorMessage="Bạn chưa bến đi." ToolTip="Vui lòng nhập bến đi." 
                             ValidationGroup="TuyenDuongValidationGroup">*</asp:RequiredFieldValidator>
                           
            </td>
            <td class="style6">
                <asp:Label ID="Label2" runat="server" Text="Bến đến"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtBenDen" runat="server" Width="89%" Height="23px"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="txtBenDenRequired" runat="server" ControlToValidate="txtBenDen" 
                             CssClass="failureNotification" ErrorMessage="Bạn chưa bến đi." ToolTip="Vui lòng nhập bến đi." 
                             ValidationGroup="TuyenDuongValidationGroup">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1" valign="top">
                <asp:Label ID="Label7" runat="server" Text="Mô tả"></asp:Label>
            </td>
            <td class="style2" colspan="3">
                <CKEditor:CKEditorControl ID="txtMoTa" runat="server" Height="254px"></CKEditor:CKEditorControl>
            </td>
        </tr>
        <tr>
            <td class="style4" align="center" colspan="4" valign="top">
                <asp:Button CssClass="btnadmin" ID="btnSave" runat="server" Text="Lưu" Width="117px" 
                    onclick="btnSave_Click"  ValidationGroup="TuyenDuongValidationGroup" />  
                <asp:Button CssClass="btnadmin" ID="btnClearNew" runat="server" Text="Thêm mới" 
                    onclick="btnClearNew_Click" Width="123px" />
                <asp:HiddenField ID="keyField" runat="server" />
            </td>
        </tr>
    </table>
    <p>
        <asp:GridView ID="gridViewData"  CssClass="grid-view"    runat="server" CellPadding="3" Width="921px" 
            AutoGenerateColumns="False" GridLines="Vertical" 
            onrowcommand="gridViewData_RowCommand" 
            onrowdatabound="gridViewData_RowDataBound" ShowHeaderWhenEmpty="True">
            
            <Columns>
                <asp:ButtonField Text="Sửa" CommandName="cmdEdit"  >
                <ControlStyle Font-Underline="True" />
                </asp:ButtonField>
                <asp:ButtonField Text="Xóa" CommandName="cmdDelete" >
                <ControlStyle Font-Underline="True" />
                </asp:ButtonField>
                <asp:BoundField HeaderText="STT" DataField="STT" >
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="Bến đi" DataField="BEN_DI" />
                <asp:BoundField HeaderText="Bến đến" DataField="BEN_DEN" />
            </Columns>
          <FooterStyle CssClass="gridfooter"/>
            <HeaderStyle CssClass="gridheader" />
            <PagerStyle CssClass="gridpager"/>
            <RowStyle CssClass="gridrownormal" />       
            <AlternatingRowStyle CssClass="gridrowalternate" />
            <SelectedRowStyle CssClass="gridselected"  />
            <SortedAscendingCellStyle  CssClass="gridrowsortasc" />
            <SortedAscendingHeaderStyle CssClass="gridheadersortasc" />
            <SortedDescendingCellStyle CssClass="gridrowsortdesc"/>
            <SortedDescendingHeaderStyle CssClass="gridheadersortdesc" />
        </asp:GridView>
    </p>
    <p>
        &nbsp;</p>
</asp:Content>
